<?php 
   if($this->status == 1)
   {
?>

<div id="box-content-middle">
    
    <script language="javascript">
	function del(id){
		if(confirm('Bạn có muốn xóa liên hệ này ?')){
			location.href='<?php echo $this->_baseUrl;?>/admin/contact/delete/id/'+id;
		}
	}
   </script>
   
   
   <?php 
   if($this->list != null)
     {
       $sum = count($this->list); 
       for( $i = 0; $i < $sum ; $i++)
       {
   ?>
        <div class="content-row <?php if($i % 2 == 0) echo "row0 "; else echo "row1 "; if($this->list[$i]['unread']==1) echo "unread"?>">
            <div style="width: 5%;"><?php echo $i+1;?></div>
            <div style="width: 44%;">
                <a href="<?php echo $this->_baseUrl;?>/admin/contact/read/id/<?php echo $this->list[$i]['contact_id'];?>">
                  <?php echo $this->list[$i]['title'];?>
                </a>
            </div>
            <div style="width: 30%;">
            <?php
                echo $this->list[$i]['fullname'].' < '.$this->list[$i]['email'].' > ';
            ?>
            </div>
            <div style="width: 15%;">
            <?php
                echo date('d/m/Y  H:i',strtotime($this->list[$i]['date_sent']));
            ?>
            </div>
            <div style="border-style: none;width: 5%;">
                  <a onclick="del(<?php echo $this->list[$i]['contact_id'];?>);" title="Xóa" style="padding-top: 5px;">
                  <img src="<?php echo $this->_baseUrl;?>/public/images/web/delete.png" height="16px" width="16px"/>
                  </a>
            </div>
      </div>
   <?php     
       }  
     }
   ?>
    </div>
    <div id="box-content-bottom">
   <?php 
   		loadHelper("pageslist");
   		pageslist($this->paginator);
   ?>
    </div>
<?php 
   }
   else 
   {
?>
    <div id="box-content-middle">
    </div>
     <div id="box-content-bottom">
     </div>
<?php 
   }
?>